using UnityEngine;

public class BallState_JumpBall : AbstractBallState
{
	public static BallState_JumpBall instance;

	private BallState_JumpBall()
	{
	}

	public static BallState_JumpBall getInstance()
	{
		if (instance == null)
		{
			instance = new BallState_JumpBall();
		}
		return instance;
	}

	public override void enter(Ball owner)
	{
		base.enter(owner);
		owner.isJumpBalled = false;
		owner.isInSomeOneHand = true;
	}

	public override void fixedUpdate(Ball owner)
	{
		base.fixedUpdate(owner);
		if (!owner.isInSomeOneHand)
		{
			owner.GetComponent<Rigidbody>().AddForce(Vector3.up * 2.8f, ForceMode.Impulse);
			owner.do_rebound();
		}
	}
}
